<template>
    <div class="my">
        <div  class="item-center" v-for="(info,index) in infos" :key="index">
            
            <p>
                <span><img :src="info.user_img"></span>
                <span>{{info.user_name}}</span>
                <span>{{info.us_date | date('yyyy-MM-dd')}}</span>
            </p>
            <p>{{info.us_title}}</p>
            <div class="text" v-html="info.us_content">{{info.us_content}}</div>
            <div class="tb">
                <div class="tb1"><i class="iconfont icon-xihuan8"></i></div>
                <div class="tb2"><i class="iconfont icon-shoucang3"></i></div>
            </div>
        </div>
    </div>
</template>

<script>
export default {
    data(){
        return{
            infos:[],
            id:"",
        }
    },
    methods:{

    },
    mounted(){
        this.id=window.localStorage.getItem("uid");
        console.log(this.id+"555");
        this.$axios.get('/mystory.do?user_id='+this.id).then((response) => {
            this.infos = response.data;
            console.log(this.infos+"00000");
        })
        .catch(function (error) {
            console.log(error);
        });
    }
}
</script>

<style scoped>
.my{
   width: 100%;
   /* height:1000px ; */
}
.item-center{
    margin-top: 20px;
    width: 100%;
    background-color: #f8f7f5;
    padding: 50px;
}
.item-center>p:nth-child(2){
    font-size: 30px;
    font-weight: 700;
    text-align: left;
    color: rgb(193, 180, 139);
    letter-spacing: 11px;
    margin-bottom: 30px;
    margin-top: 50px;
}
.item-center>p:nth-child(1){
    text-align-last: left;
    font-size: 15px;
    font-weight: 700;
    display: flex;
}
.item-center>p:nth-child(1) img{
    width: 50px;
    border-radius: 50%;

}
.item-center>p:nth-child(1)>span:nth-child(1){
    width: 7%;
}
.item-center>p:nth-child(1)>span:nth-child(2){
    width: 90%;
    font-size: 20px;
    padding-top: 12px;
    margin-left: 20px;
}
.item-center>p:nth-child(1)>span:nth-child(3){
    width: 15%;
    
}
.text{
    font-size: 20px;
    letter-spacing: 1px;
    line-height: 50px;
    word-break:break-word;
    text-align-last: left;

}
.tb{
    width: 100%;
    text-align: left;
    margin-top: 50px;
}
.tb1{
    display: inline-block;
    width: 65px;
    height: 34px;
    border: 1px solid #ccc;
    border-radius: 100px;
    margin-right: 20px;
    line-height: 34px;
    text-align: center;   
   
}
.tb2{
    display: inline-block;
    width: 65px;
    height: 34px;
    border: 1px solid #ccc;
    border-radius: 100px;
    text-align: center;
}
.icon-xihuan8{
    font-size: 25px;
    line-height: 34px;
    color: #ccc;

}
.icon-xihuan8:hover{
    font-size: 25px;
    line-height: 34px;
    color: rgba(253, 110, 110);
}
.icon-shoucang3{
    font-size: 25px;
    line-height: 34px;
    color: #ccc;
}
.icon-shoucang3:hover{
    font-size: 25px;
    line-height: 34px;
    color: rgb(101, 159, 255);
}
</style>